#pragma once

const int WINDOW_WIDTH = 800;
const int WINDOW_HEIGHT = 800;

const DATA_TYPE PI = 3.14159265f;
#define DEG2RAD(x) ((x) * PI / 180)
#define RAD2DEG(x) ((x) * 180 / PI)

const DATA_TYPE EPSILON = 10E-6f;

template<class T>
T clamp(T v, T a, T b)
{
	return v < a ? a : b < v ? b : v; 
}

DWORD Color2RGBA(DATA_TYPE r, DATA_TYPE g, DATA_TYPE b, DATA_TYPE a);
DATA_TYPE Round(DATA_TYPE x);